package Test.JVM.OOM;

import java.util.ArrayList;
import java.util.List;

/**
 * -Xms20M -Xmx20M -XX:+HeapDumpOnOutOfMemoryError
 * @author pengshuai
 * @date 2022/4/12 21:24
 */
public class HeapOOM {

    static class  HeapObject {

    }

    public static void main(String[] args) {
        List<HeapObject> list = new ArrayList<>();

        while (true){
            list.add(new HeapObject());
        }

    }

}
